//
//  BattleAnimationController.h
//  basicMMMRPG
//
//  Created by Simon André on 15/01/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
@class CharacterViewController;


@interface CharacterBattleAnimationController : NSObject {
	// characterViewController
	CharacterViewController* character;
	// moving
	BOOL animationIsExecuting;
	CGFloat animationIncrement;
	CGPoint currentMoveDestination;
	CGPoint currentMoveOrigin;
	SEL currentMoveEndSelector;
	id currentMoveEndSelectorTarget;
	SEL completedMoveSelector;
	// attacking
	BOOL attackIsInPhaseOne;
	CGPoint originalPosition;
	CGPoint targetPosition;
}

// characterViewController
@property(nonatomic,retain) CharacterViewController* character;
// moving
@property(nonatomic,retain) id currentMoveEndSelectorTarget;
@property(nonatomic,assign) BOOL animationIsExecuting;
@property(nonatomic,assign) CGFloat animationIncrement;
@property(nonatomic,assign) CGPoint currentMoveOrigin;
@property(nonatomic,assign) CGPoint currentMoveDestination;
@property(nonatomic,assign) SEL currentMoveEndSelector;
@property(nonatomic,assign) SEL completedMoveSelector;
// attacking
@property(nonatomic,assign) BOOL attackIsInPhaseOne;
@property(nonatomic,assign) CGPoint originalPosition;
@property(nonatomic,assign) CGPoint targetPosition;

-(id) initWithCharacter:(CharacterViewController*) character;

-(void) executeAttackToTarget:(UIViewController*) target;
-(void) executeMoveToDestination:(CGPoint) destination withActionAtEnd:(SEL)endSelector onTarget:(id) endSelectorTarget;
-(void) executeMoveIncrement;
-(void) setMoveOrientation;

-(void) executeAttackToPoint:(CGPoint) targetPoint;
-(void) executeAttackToTarget:(UIViewController*) target;
-(void) executeAttackToTargetInitlalMove;
-(void) chanceAttackdestination:(CGPoint) newTargetPosition;
-(void) executeAttackToTargetAttackAction;
-(void) executeAttackToTargetBackToInitialPosition;

@end
